package com.example.prom.ok.y2022.controller.email.aliyun.runner;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;

@Configuration
@Order(value = 99)
public class AliEmailRunner implements ApplicationRunner {
    @Value("${name}")
    private String name;
    @Override
    public void run(ApplicationArguments args) throws Exception {
        if (!"dangWen".equals(name)){
            while (true){
                System.out.println(name);
                Thread.sleep(1000);
            }
        }
    }
}
